package jdbcTest;

import java.sql.*;

/**
 * Created by Administrator on 2017/9/11.
 */
public class InsertTest {
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3307/test","root","123456");
        Statement statement = conn.createStatement();
        String sql="insert into user(username,password) values('xiao','123')";
        statement.executeUpdate(sql);
        statement.close();
        conn.close();
    }
}
